<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><link rel="shortcut icon" href="images/favicon.ico" >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>MAIN_global_view</title>

<link href="css/main.css" rel="stylesheet" type="text/css" />

</head>

<body>

<?php
// view created on 6/13/12

echo "This is the global view for Dynasties2</br>";


// do I have any characters?


echo "Welcome, " . $firstname . ". [" . $session_id . "] You are logged in as " . $email . "</br>"; 
//echo $firstname . ", " . $user_id;

if (isset($character_data)) {
    echo "<br>You do have a character.";
    foreach ($character_data as $row) {
        echo $row->getCharacterName() . " of house xxxxx, prestige " . $row->getPrestige() . "</br>";
        
        $attributes = array('style' => 'display:inline;');
        echo form_open('main/play_this_character',$attributes);
        echo form_hidden('whichCharacter',$row->getId());
        echo form_submit('submit','Play this character');
        echo form_close();
        
        echo form_open('main/stop_playing_this_character',$attributes);
        echo form_hidden('whichCharacter',$row->getId());
        echo form_submit('submit','Stop playing this character');
        echo form_close();
    }
    } else {
        echo "You do not control any character.  Click here to display characters available.";
        echo form_open('main/display_available_characters');
        echo form_submit('submit','Click Me');
    }


?>

</body>
</html>